<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>event2.html</title>
	
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
	<script type="text/javascript">
		function newPicWindow()
		{
			window.open(this.src);
		}
		for(var i=0;i<document.images.length;i++)
		{
			document.images[i].onclick = newPicWindow;
		}
		/*
		 *	press ctrl+enter实现提交
		 */
		 var txtContent = document.getElementById("txtContent");
		 txtContent.onkeydown = function(evt)
		 {
		 	evt = evt?evt:window.event;
		 	if(evt.ctrlKey&&13==evt.keyCode)
		 	{
		 		this.form.submit();
		 	}
		 }
		 function ctlent(event) {
			if( (event.ctrlKey && event.keyCode == 13) || (event.altKey && event.keyCode == 83))
			{
			ok();
			}
		}
		function ok()
		{
			alert("提交:"+document.myForm.txtContent.value);
		}
	</script>
  </head>
  
  <body>
     <!--   <img src="../image/b1204.jpg"  >  -->
     <form action="event.html" method="post" name="myForm">
     	<span>标题：</span><input type="text" name="tbTitle" />
     	<br>
     	<span>内容：</span>
     	<textarea id="txtContent" name="txtContent" cols="20" rows="10" onkeydown="ctlent(event);"></textarea>
     	<br>
     	<input type="submit" value="提交" />
     </form>
  </body>
</html>
